package com.bifang.core.dict.gateway.controller;

import com.bifang.common.helper.RedisHelper;
import com.bifang.common.vo.AppResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 缓存管理
 *
 * @author chenzh
 * @date 2019-112-10
 */
@RestController
@RequestMapping(value = "/cache")
@Api(tags = "缓存管理")
public class CacheContorller {
    @Autowired
    RedisHelper redisHelper;
    /** 分页查询数据字典信息 */
    @PostMapping(value = "/clear/all", produces = "application/json;charset=UTF-8")
    @ApiOperation(value = "清除所有缓存", notes = "清除所有缓存")
    public AppResponse clearAll() {
        redisHelper.clearAll();
        return AppResponse.successData("清除成功");
    }
}
